﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Security;

namespace LeMigue.TeamPortal.Controllers
{
    public class LoginController : Controller
    {


        public ActionResult Index()
        {
            return View();
        }

        public ActionResult Logar(FormCollection post, string returnUrl)
        {
            string Login = post["Login"];
            string Senha = post["Senha"];

            if (Membership.Provider.ValidateUser(Login,Senha))
            {
                FormsAuthentication.SetAuthCookie(Login, true);
                return RedirectToAction("Index", "Home");
            }


            return View("Index");
        }


    }
}
